package com.rightsidetech.mall.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class CommodityIsGroundingReq implements Serializable {

    @ApiModelProperty(value = "id",required = true)
    @NotNull(message = "商品id不可为空")
    @Min(value = 0,message = "id不可为负数")
    private Long id;

    @ApiModelProperty(value = "商品状态 0下架商品 1上架商品",required = true)
    @NotNull(message = "商品状态不可为空")
    @Range(max = 1,min = 0,message = "状态只有上架下架两种")
    private Byte status;
}
